package cn.yuanqiao.cqbc.fileBackup.taskClass;

import cn.yuanqiao.cqbc.fileBackup.domain.Filebackup;

import cn.yuanqiao.cqbc.timedTasks.taskClass.taskListService.TaskInspectionContext;
import cn.yuanqiao.cqbc.timedTasks.taskClass.taskListService.TaskListService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @ClassName: TaskInspection
 * @Description: 类的描述
 * @author: lihuahua
 * @date: 2022/11/11 19:43
 * @Blog:
 */

@Service
@Slf4j
@Scope("prototype")
public class FilebackupInspection implements Runnable{

    @Autowired
    private TaskInspectionContext taskInspectionContext;

    private Filebackup param;


    public void taskInspection(Filebackup param) {
        this.param = param;
    }


    @Override
    public void run() {

        TaskListService taskList = taskInspectionContext.getTaskListService("taskList");
        try {
            Map<String, Object> task = taskList.task(param);
        }catch (Exception ex){
            ex.printStackTrace();
        }
        }

    }

